#include "toy.h"

void Toy::displayInfo() const {
    std::cout << "ID: " << id << ", Name: " << name << ", Type: " << type << ", Price: " << price
              << ", Total: " << total << ", Available: " << available << std::endl;
}

std::string Toy::serialize() const {
    return std::to_string(id) + "," + name + "," + type + "," +
           std::to_string(price) + "," + std::to_string(total) + "," + std::to_string(available);
}

int Toy::getId() const {
    return id;
}

std::string Toy::getName() const {
    return name;
}

std::string Toy::getType() const {
    return type;
}

double Toy::getPrice() const {
    return price;
}

int Toy::getTotal() const {
    return total;
}

int Toy::getAvailable() const {
    return available;
}

void Toy::setName(const std::string& name) {
    this->name = name;
}

void Toy::setType(const std::string& type) {
    this->type = type;
}

void Toy::setPrice(double price) {
    this->price = price;
}

void Toy::setTotal(int total) {
    this->total = total;
}

void Toy::setAvailable(int available) {
    this->available = available;
}

Toy::Toy(int id, const std::string& name, const std::string& type, double price, int total, int available)
    : id(id), name(name), type(type), price(price), total(total), available(available) {}    